package com.luxuewen.sxa.common.enums;

public enum ResponseEnum {
    SUCCESS(0,"成功!"),
    FAILURE(1,"失败"),
    /**系统相关的错误码：5开头**/
    ERROR(50000,"系统异常，请稍后重试"),
    /**参数相关的错误码：1开头**/
    PARAM_ERROR(10000,"参数异常"),

    /**权限相关的错误码：2开头**/
    INVALID_TOKEN(20100,"访问令牌不合法"),
    ACCESS_DENIED(20200,"没有权限访问该资源"),
    USERNAME_OR_PASSWORD_ERROR(20300,"用户名或密码错误");

    private final int code;

    private final String message;

    ResponseEnum(int code, String message){
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
